<template>

  <table border="1" cellspacing="0" cellpadding="10">
    <caption>
      <slot name="tit">
        默认标题
      </slot>
    </caption>
    <thead>
        <tr>
            <th>编号</th>
            <th>资产名称</th>
            <th>价格</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        <tr v-for="(item, index) in list" :key="item.id">
            <td>
              <slot :index="index" name="index">
                {{index}}
              </slot>
            </td>
            <td>
              <slot :theName="item.name" name="theName">
                {{item.name}}
              </slot>
            </td>
            <td>
              <slot :price="item.price" name="price">
                {{item.price}}
              </slot>
            </td>
            <td>
              <slot :time="item.time" name="time">
                {{item.time}}
              </slot>
            </td>
            <td>
              <slot name="operate">
                <button>默认按钮</button>
              </slot>
            </td>
        </tr>
    </tbody>
  </table>

</template>

<script>
export default {
  data () {
    return {

    }
  },

  props: {
    list: {
      type: Array,
      require: true
    }
  },

  created () {

  },

  methods: {

  }
}
</script>

<style scoped lang='less'>

</style>
